<!--
 * @Author: your name
 * @Date: 2022-01-23 09:52:38
 * @LastEditTime: 2022-01-23 12:40:26
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \算法测试\day0906\原型测试.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var StockPrice = function () {
            this.time = [3,1];
            let money = [];
            let newMoney = 0;//最新价格
            let maxMoney = Number.MIN_VALUE;
            let minMoney = Number.MAX_VALUE;
        };

        /** 
         * @param {number} timestamp 
         * @param {number} price
         * @return {void}
         */
        StockPrice.prototype.update = function (timestamp, price) {
            let newmon=[...this.time];
            newmon.sort();
            console.log(newmon);
        };
        var obj = new StockPrice();
        obj.update(1, 2);

        let obj1={a:123};
        let b=obj1;
        b=undefined;
        console.log(b,obj1);

        let obj2={a:1,b:2};
        let change=function(obj){
            obj.b=456;
        }
        change(obj2);
        console.log(obj2);
    </script>
</body>

</html>